`timescale 10ns / 1ns 

module BCD_tb;
    reg [11:0] hex;
    wire [15:0] bcd;

    initial begin
        $dumpfile("output/BCD_tb.vcd");
        $dumpvars(0, BCD_tb);
    end

    initial begin
        hex = 0;

        #10 hex = 16'b1;
        #10 hex = 16'b11;
        #10 hex = 16'b111;
        #10 hex = 16'b1111;
        #10 hex = 16'b1111_1;
        #10 hex = 16'b1111_11;
        #10 hex = 16'b1111_111;
        #10 hex = 16'b1111_1111;
        #10 hex = 16'b1111_1111_1;
        #10 hex = 16'b1111_1111_11;
        #10 hex = 16'b1111_1111_111;
        #10 hex = 16'b1111_1111_1111;

        repeat (10) begin
            #10;
            hex = {$random} % 200;
            #10;
        end

        #400 $stop;
    end

    BCD # (
        .WIDTH              (16)
    )
    BCD_inst
    (
        .hex                (hex),
        .bcd                (bcd)
    );

endmodule